<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">

<head><title>Feedback</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <link href="css/common.css" rel="stylesheet" type="text/css">
</head>

<body>
<f:view>
    <f:loadBundle basename="ResourceBundle" var="bundle"/>
    <h:form id="audioContentForm">
        <div id="external">
            <div id="menu">
                <h:outputText value="#{bundle.menu_title}"/>
                <br>
                <%@ include file="menu.jsp" %>
            </div>
            <div id="languages">
                <div class="internal-languages">
                    <strong>
                        <h:commandLink value="EN"/>
                        <h:commandLink value="HI"/>
                        <h:commandLink value="TAM"/>
                    </strong>
                </div>
            </div>


            <div id="content">
                <div id="title"> ${bundle.feedback_header}</div>

                <div style=" position:absolute; top:7%; height: 18%; left: 2%; width: 25%; background-color: #7ccff5;">
                    <br>
                    <h:outputText value="#{bundle.notification}"/>
                    <h:selectOneMenu>
                        <f:selectItems value="#{audioContentBean.statuses}"/>
                    </h:selectOneMenu>

                    <br>
                    <h:outputText value="#{bundle.is_answered}"/>
                    <h:selectOneMenu>
                        <f:selectItems value="#{audioContentBean.statuses}"/>
                    </h:selectOneMenu>
                </div>
                <div style="position:absolute; top:7%;height: 18%;left: 29%; width: 40%; background-color:  #7ccff5; text-align: left;">
                    <br>
                    <h:outputText value="#{bundle.find_by_mes_id}"/>
                    <h:inputText style="width: 50px"/>
                    <h:commandButton value="#{bundle.ok_button}"/>

                    <br>
                    <h:outputText value="#{bundle.find_by_MSISDN}"/>
                    <h:inputText/>
                    <h:commandButton value="#{bundle.ok_button}"/>
                </div>
                <div style="position:absolute; top:7%;height: 18%;left: 71%; width: 25%; background-color:  #7ccff5; text-align: right;">
                    <br>
                    <h:outputText value="#{bundle.rowCountOnPage}"/>
                    <h:inputText style="width: 100px"/>
                    <br>
                    <h:outputText value="#{bundle.fullRowCount}"/>
                    <h:inputText style="width: 100px" value="4" readonly="true"/>
                </div>

                <div id="data-table">
                    <h:dataTable value="#{feedbackBean.feedbackDecorators}" var="feedback" border="1" width="100%"
                                 headerClass="table-header">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.messageId}"/>
                            </f:facet>
                            <h:outputText value="#{feedback.mesID}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="MSISDN"/>
                            </f:facet>
                            <h:outputText value="#{feedback.MSISDN}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Question text"/>
                            </f:facet>
                            <h:outputText value="#{feedback.question}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="SMS notification"/>
                            </f:facet>
                            <h:outputText value="#{feedback.notification}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="The answer was given?"/>
                            </f:facet>
                            <h:outputText value="#{feedback.answered}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Answer text"/>
                            </f:facet>
                            <h:outputText value="#{feedback.answer}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Answer"/>
                            </f:facet>
                            <h:commandButton value="#{bundle.edit_button}" action="#{feedbackBean.editAnswer}">
                                <f:param name="edit_answer" value="#{feedback.mesID}"/>
                            </h:commandButton>
                        </h:column>
                    </h:dataTable>
                </div>

                <div id="page-navigation">${bundle.navigation}</div>
            </div>
        </div>
    </h:form>
</f:view>
</body>
</html>
